<template>
  <!-- 商品列表 -->
	<view :style="colorStyle">
		<view class='productList'>
			<view class='search acea-row row-between-wrapper'>
				<view 
					class='input acea-row row-between-wrapper app-border-color' 
					:class="promotions_type?'on':''"
				>
					<text class='iconfont icon-sousuo'></text>
					<!-- <input 
						placeholder='搜索商品名称' 
						placeholder-class='placeholder' 
						confirm-type='search' 
						name="search"
						:value='where.keyword' 
						@confirm="searchSubmit"
					></input> -->
					<input
						placeholder='搜索商品名称' 
						placeholder-class='placeholder' 
						confirm-type='search' 
						name="search"
						:value='where.keyword' 
						@confirm="confirmSearch"
					></input>
				</view>
				<!-- <view class='iconfont' v-if="!promotions_type"
					:class='is_switch==true?"icon-pailie":"icon-tupianpailie"' @click='Changswitch'>
				</view> -->
			</view>
			<view class='nav flex acea-row row-middle row-around'>
				<view class="filter-l flex">
					<view 
						class='item line1' 
						:class='isDefault ? "font-num app-font-color":""' 
						@click='set_where(1)'
					>
						综合
					</view>
					<view class='item' @click='set_where(2)'>
					<!-- <view class='item' @click='confirmRequestFun'> -->
						价格
						<image v-if="price==1" src='../../../static/images/up.png'></image>
						<image v-else-if="price==2" src='../../../static/images/down.png'></image>
						<image v-else src='../../../static/images/horn.png'></image>
					</view>
					<view class='item' @click='set_where(3)'>
					<!-- <view class='item' @click='confirmRequestFun'> -->
						销量
						<image v-if="stock==1" src='../../../static/images/up.png'></image>
						<image v-else-if="stock==2" src='../../../static/images/down.png'></image>
						<image v-else src='../../../static/images/horn.png'></image>
					</view>
				</view>
				<view class="filter-r flex">
					<view 
						class="r-multiple-screening flex"
						@click="filtrateShowFun"
					>
						<u--image 
							:showLoading="true" 
							src="../../../static/images/multiple-screening-icon.png" 
							width="28rpx" 
							height="28rpx"
						></u--image>
						<text>筛选</text>
					</view>
					<u-line 
						color="#EBEBEB" 
						direction="col" 
						length="24" 
						margin="0 10rpx"
					></u-line>
					<view class='iconfont' v-if="!promotions_type"
						:class='is_switch==true?"icon-pailie":"icon-tupianpailie"' @click='Changswitch'>
					</view>
				</view>
				<!-- down -->
				<!-- <view class='item' :class='nows ? "font-color":""' @click='set_where(4)'>新品</view> -->
				<!-- <view class='item' v-if="brandList.length" :class="{clored:brandArray.length>0}" @click='set_brand'>
					品牌
					<image src='../static/xiala.png'></image>
				</view> -->
				<homeList :navH="navH" :goodList="goodList" :currentPage="currentPage" :sysHeight="sysHeight"
					:goodsShow="true"></homeList>
			</view>
			<view class='list list-box-row acea-row row-between-wrapper' :class='is_switch==true?"":"on"' v-if="is_switch==false">
				<view class="list-item">
					<view 
						v-for="(itemn, index) in productList"
						:key="index"
					>
						<view class="item" 	@click="godDetail(itemn)">
							<view class="pic">
								<image :src="itemn.image"></image>
							</view>
							<view class="main-box">
								<view class="title m-ellipsis">
									<view class="news app-label" v-if="itemn.dis_old == 100">全新</view>
									{{ itemn.store_name }}
								</view>
								<view class="sub">官方首发新品，量不多1</view>
								<view class="type">
									<view 
										class="jp" 
										v-if="itemn.StoreProductLabel.length >= 1"
									>
										{{ itemn.StoreProductLabel[0] }}
									</view>
									<view 
										class="bt" 
										v-if="itemn.StoreProductLabel.length >= 2"
									>
										{{ itemn.StoreProductLabel[1] }}
									</view>
								</view>
								<view class="mb-bottom">
									<view class="price">¥<text>{{ itemn.min_day_price }}</text> <text class="note">/天</text></view>
									<view class="tabs">
										<view class="tab uu-label">顺丰包邮</view>
										<!-- <view class="tab uu-label">租完归还</view> -->
									</view>
								</view>
								
							</view>
						</view>
						
					</view>
				</view>
			</view>
			<view class="list waterList" v-else>
				<waterfallsFlow ref="waterfallsFlow" :list="productList" @wapper-lick="godDetail">
					<view v-for="(item, index) of productList" :key="index" slot="slot{{index}}">
						<view class="waterfalls">
							<view class='name line2'>
								<span class="tit-tag app-label" v-if="item.dis_old == 100">
									全新
								</span>
								<span v-else class="tit-tag app-label">
									{{item.dis_old}}新
								</span>
								{{item.store_name}}	
							</view>
							
							<view class="info-lable-box flex">
								<view 
									class="lable-li li-cor0" 
									v-if="item.StoreProductLabel.length >= 1"
								>
									{{ item.StoreProductLabel[0] }}
								</view>
								<view
									class="lable-li li-cor1" 
									v-if="item.StoreProductLabel.length >= 2"
								>
									{{ item.StoreProductLabel[1] }}
								</view>
							</view>
							
							<view class="flex price-box">
								<view class="info-price flex">
									<view class="price-icon">
										¥
									</view>
									{{ item.min_day_price }}
									<view class="price-unit">
										/天
									</view>
								</view>
							</view>
							
							<view class="serve-box flex">
								<view class="serve-li uu-label">
									顺丰包邮
								</view>
							<!-- 	<view class="serve-li uu-label">
									租完归还
								</view> -->
							</view>
							
							
							<!-- <span class="label"
								v-if="item.activity && item.activity.type === '1' && !promotions_type">秒杀</span>
							<span class="label"
								v-if="item.activity && item.activity.type === '2' && !promotions_type">砍价</span>
							<span class="label"
								v-if="item.activity && item.activity.type === '3' && !promotions_type">拼团</span>
							<text class="label" v-if="item.promotions.title">{{item.promotions.title}}</text>
							<view class="vip acea-row row-middle">
								<view class='money font-color'>
									￥<text class='num'>{{item.price.toString().split(".")[0]}}</text>
									<text class='nums'
										v-if="item.price.toString().split('.').length>1">.{{item.price.toString().split(".")[1]}}</text>
								</view>
								<view class='vip-money acea-row row-middle' v-if="item.vip_price && item.vip_price > 0">
									<view>￥{{item.vip_price}}</view>
									<view class="icon on" v-if="item.price_type && item.price_type == 'member'"><text
											class="iconfont icon-huangguan4"></text>SVIP</view>
									<view class="icon" v-if="item.price_type && item.price_type == 'level'"><text
											class="iconfont icon-dengjitubiao"></text>{{item.level_name}}</view>
								</view>
							</view>
							<view class='vip acea-row row-between-wrapper'>
								<view>已售{{item.sales}}{{item.unit_name || '件'}}</view>
								<view>评分 {{item.star}}</view>
							</view> -->
						</view>
					</view>
				</waterfallsFlow>
				<!-- <waterfallsFlow ref="waterfallsFlow" :list="productList" @wapper-lick="godDetail">
					<template v-slot="{datas}" >
						<view class="waterfalls">
							<view class='name line2 waterfalls-tit'>
								<span class="tit-tag" v-if="datas.dis_old == 100">
									全新
								</span>
								{{ datas.store_name }}
							</view>
							<view class="tips-box">
								官方首发新品，量不多
							</view>
							<view class="info-lable-box flex">
								<view 
									class="lable-li li-cor0" 
									v-if="datas.StoreProductLabel.length >= 1"
								>
									{{ datas.StoreProductLabel[0] }}
								</view>
								<view
									class="lable-li li-cor1" 
									v-if="datas.StoreProductLabel.length >= 2"
								>
									{{ datas.StoreProductLabel[1] }}
								</view>
							</view>
							<view class="flex price-box">
								<view class="info-price flex">
									<view class="price-icon">
										¥
									</view>
									{{ datas.min_day_price }}
									<view class="price-unit">
										/天
									</view>
								</view>
							</view>
							<view class="serve-box flex">
								<view class="serve-li">
									顺丰包邮
								</view>
								<view class="serve-li">
									租完归还
								</view>
							</view>
						</view>
					</template>
				</waterfallsFlow> -->
				
			</view>
			<view class='loadingicon acea-row row-center-wrapper' v-if='productList.length > 0'>
				<text class='loading iconfont icon-jiazai' v-if='loading'></text>
				{{loadTitle}}
			</view>
		</view>
		<view class='noCommodity' v-if="!productList.length">
			<view class='emptyBox'>
				<image :src="imgHost + '/statics/images/no-thing.png'"></image>
				<view class="tips">暂无商品，去看点别的吧</view>
			</view>
			<!-- <recommend :hostProduct="hostProduct"></recommend> -->
		</view>
		<productWindow :attr="attr" :isShow='1' :iSplus='1' :iScart='1' :storeInfo='storeInfo' @myevent="onMyEvent"
			@ChangeAttr="ChangeAttr" @ChangeCartNum="ChangeCartNum" @attrVal="attrVal" @iptCartNum="iptCartNum"
			@goCat="goCat" id='product-window' :is_vip="is_vip" :fangda='false'></productWindow>
		<!-- <home v-if="navigation"></home> -->
		<view class="mask" @touchmove.prevent :hidden="brandtip === false" @click="closeBrand"></view>
		<view class="selectbrand" :class="brandtip === true ? 'on' : ''">
			<view class="box">
				<view class="selet">
					<view 
						class="seletbox acea-row row-center-wrapper"
						:class="{seleton:brandArray.indexOf(item.id) != -1}" 
						v-for="(item,index) in brandList"
						:key="index" 
						@click="seletBrand(item.id)"
					>
						{{item.brand_name}}
					</view>
				</view>

				<view class="btn">
					<div class="sambox reset" @click="brandReset">重置</div>
					<div class="sambox ok" @click="brandOk">确定</div>
				</view>
			</view>
		</view>
		<authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize>
		
		<!-- 底部更多筛选弹框 -->
		<u-popup 
			:show="filtrateShow" 
			@close="popupClose" 
			:closeable="true"
			round="24"
		>
			<view class="popup-box">
				<view class="head-box">
					<view class="head-tit tit-txt">
						更多筛选
					</view>
					<view class="filter-scroll">
						<view class="tit-txt">
							品牌
						</view>
						<view class="brand-box flex">
							<view
								class="brand-list" 
								v-for="(item, index) in filterBrandList"
								:key="index"
							>
								<view 
									class="brand-li" 
									:class="{selectbrandLi: item.selectBrand,'mar-t24': index > 2}"
									@click="clickBrandLi(item.id, index)"
								>
									{{ item.brand_name }}
								</view>
							</view>
						</view>
						<view class="tit-txt">
							租金（元/天）
						</view>
						<view class="price-interval flex">
							<view class="price-ipt price-min">
								  <input
								  	type="number" 
								  	placeholder="最低价" 
								  	:value="rentMin" 
								  	id="1"
								  	@input="inputChange"
								  >
							</view>
							<view class="line"></view>
							<view class="price-ipt price-max">
								  <input
								  	type="number" 
								  	placeholder="最高价" 
								  	:value="rentMax" 
								  	id="2"
								  	@input="inputChange"
								  >
							</view>
						</view>
						<view class="tit-txt">
							押金（元）
						</view>
						<view class="price-interval flex">
							<view class="price-ipt price-min">
								  <input
								  	type="number" 
								  	placeholder="最低价" 
								  	:value="depositaMin" 
								  	id="3"
								  	@input="inputChange"
								  >
							</view>
							<view class="line"></view>
							<view class="price-ipt price-max">
								<input 
									type="number" 
									placeholder="最高价" 
									:value="depositaMax" 
									id="4"
									@input="inputChange"
								>
							</view>
						</view>
					</view>
				</view>
				<view class="popup-fot flex">
					<view class="btn btn1" @click="resetFilter">
						重置
					</view>
					<view class="btn btn2 app-btn-bg" @click="confirmRequestFun">
						确定
					</view>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	let sysHeight = uni.getSystemInfoSync().statusBarHeight;
	// #ifdef MP
	let menuButton = uni.getMenuButtonBoundingClientRect();
	// #endif
	import home from '@/components/home';
	import homeList from '@/components/homeList';
	import productWindow from '@/components/productWindow';
	import waterfallsFlow from "@/components/maramlee-waterfalls-flow/maramlee-waterfalls-flow.vue";
	import {
		getProductslist,
		getProductHot,
		brand,
		getAttr,
		postCartAdd,
		brandList
	} from '@/api/store.js';
	import { getSearchList } from "@/api/homeSearch.js"
	import {
		toLogin
	} from '@/libs/login.js';
	import recommend from '@/components/recommend';
	import {
		mapGetters
	} from "vuex";
	import {
		goShopDetail
	} from '@/libs/order.js';
	import {
		getCartList,
		getCartCounts
	} from '@/api/order.js';
	import colors from '@/mixins/color.js';
	import {HTTP_REQUEST_URL} from '@/config/app';
	export default {
		computed: mapGetters(['uid', 'isLogin']),
		components: {
			recommend,
			home,
			homeList,
			productWindow,
			waterfallsFlow
		},
		mixins: [colors],
		data() {
			return {
				// #ifdef MP
				menuButton:menuButton,
				// #endif
				id: 0,
				productValue: [], //系统属性
				is_vip: 0, //是否是会员
				attr: {
					cartAttr: false,
					productAttr: [],
					productSelect: {}
				},
				attrValue: '', //已选属性
				navH: 22,
				sysHeight: sysHeight,
				goodList: true,
				currentPage: false,
				brandtip: false, //品牌弹窗
				brandArray: [],
				productList: [],
				is_switch: true,
				where: {
					sid: 0,
					keyword: '',
					priceOrder: '',
					salesOrder: '',
					news: 0,
					page: 1,
					limit: 10,
					cid: 0,
					brand_id: [],
					promotions_id: 0
				},
				price: 0,
				stock: 0,
				nows: false,
				loadend: false,
				loading: false,
				loadTitle: '加载更多',
				title: '',
				hostProduct: [],
				hotPage: 1,
				hotLimit: 10,
				hotScroll: false,
				brandList: [],
				storeInfo: {},
				promotions_type: 0,
				totalPrice: 0,
				promotionsInfo: {},
				totalNum: 0,
				imgHost:HTTP_REQUEST_URL,
				isShowAuth: false,
				filtrateShow: false, // 更多筛选show
				selectbrandIds: [], // 选中的品牌
				rentMin: "", // 租金最小价格
				rentMax: "", // 租金最大价格
				depositaMin: "", // 押金最小价格
				depositaMax: "", // 押金最大价格
				filterBrandList: [], // 品牌列表
				isDefault: true
			};
		},
		onLoad: function(options) {
			this.where.cid = options.cid || 0;
			this.$set(this.where, 'sid', options.sid || 0);
			this.title = options.title || '';
			this.$set(this.where, 'keyword', options.searchValue || '');
			this.$set(this.where, 'productId', options.productId || '');
			if (options.promotions_type) {
				this.promotions_type = options.promotions_type;
				this.where.promotions_id = options.promotions_id;
				if (options.promotions_type) {
					this.is_switch = false
				}
			}
			// this.get_product_list();
			// this.getBrand();
			// 获取搜索列表
			this.getSearchListFun();
			/* 获取品牌列表 */
			this.getBrandList();
		},
		onShow() {
			uni.removeStorageSync('form_type_cart');
			if (this.isLogin && !this.is_switch) {
				this.getCartList();
				this.getCartNum();
			}
		},
		
		methods: {
			onReachBottom() {
				if(this.loadend) return
				this.where.page ++;
				this.loading = true;
				this.loadTitle = "加载中"
				this.getSearchListFun();
			},
			/* input search 确定搜索 */
			confirmSearch(e) {
				this.where.keyword = e.detail.value;
				this.confirmRequestFun();
			},
			/* input 发生改变 处理支付宝双向绑定问题 */
			inputChange(e) {
				let arr = [
					{
						name: 'rentMin',
						id: 1,
					},
					{
						name: 'rentMax',
						id: 2,
					},
					{
						name: 'depositaMin',
						id: 3,
					},
					{
						name: 'depositaMax',
						id: 4,
					},
				]
				arr.map(item => {
					if(item.id == e.currentTarget.id) {
						this[item.name] = e.detail.value
					}
				})
			},
			/* 获取搜索出的商品列表 */
			getSearchListFun() {
				getSearchList({
					keyword: this.where.keyword,
					brand_id: this.selectbrandIds.join(","),
					begin_price: this.rentMin,
					end_price: this.rentMax,
					begin_deposit_price: this.depositaMin,
					end_deposit_price: this.depositaMax,
					priceOrder: this.where.priceOrder,
					salesOrder: this.where.salesOrder,
					page: this.where.page,
					limit: this.where.limit
				}).then(res => {
					this.productList = [...this.productList, ...res.data.list]
					this.loadend = res.data.list.length < this.where.limit;
					this.loading = false;
					this.loadTitle = this.loadend ? '没有更多内容啦~' : '加载更多';
				}).catch(err => {
					this.loading = false;
					this.loadTitle = '加载更多';
				})
			},
			/* 重置弹框中的筛选 */
			resetFilter() {
				this.depositaMax = "";
				this.depositaMin = "";
				this.rentMax = "";
				this.rentMin = "";
				this.selectbrandIds = [];
				this.filterBrandList.forEach(item => {
					item.selectBrand = false;
				})
				this.confirmRequestFun()
			},
			/* 发起请求*/
			confirmRequestFun() {
				this.where.page = 1;
				this.productList = [];
				this.loading = true;
				this.loadTitle = "加载中";
				this.getSearchListFun();
				this.popupClose();
				console.log("确定搜索");
			},
			/* 获取品牌列表 */
			getBrandList() {
				brandList().then(res => {
					this.filterBrandList= res.data.list;
					/* 回显选中的品牌 */
					this.filterBrandList.forEach(item => {
						item.selectBrand = false;
					})
				})
			},
			/* 选中品牌 */
			clickBrandLi(id, index) {
				let indexOf = this.selectbrandIds.indexOf(id)
				if(indexOf == -1) {
					this.selectbrandIds.push(id)
					this.filterBrandList[index].selectBrand = true
				}else {
					this.selectbrandIds.splice(indexOf, 1)
					this.filterBrandList[index].selectBrand = false
				}
			},
			/* 关闭弹框 */
			popupClose() {
				this.filtrateShow = false;
			},
			/* 显示筛选弹框 */
			filtrateShowFun() {
				this.filtrateShow = true;
			},
			getIsLogin(){
				// #ifndef MP
				toLogin()
				// #endif
				// #ifdef MP
				this.isShowAuth = true;
				// #endif
			},
			onLoadFun(){
				if (!this.is_switch) {
					this.getCartList();
					this.getCartNum();
				}
				this.isShowAuth = false
			},
			// 授权关闭
			authColse: function(e) {
			  this.isShowAuth = e
			},
			getCartNum() {
				getCartCounts().then(res => {
					this.totalNum = res.data.count;
				}).catch(err => {
					return this.$util.Tips({
						title: err
					});
				})
			},
			getCartList() {
				let truePrice = 0;
				getCartList().then(res => {
					let data = res.data,
						valid = res.data.valid;
					valid.forEach(item => {
						item.promotions.forEach(z => {
							if (this.where.promotions_id == z.id) {
								this.promotionsInfo = z;
							}
						})
						item.cart.forEach(j => {
							truePrice = this.$util.$h.Add(truePrice, this.$util.$h.Mul(j.truePrice, j.cart_num));
						})
					})
					this.totalPrice = this.$util.$h.Sub(truePrice, data.deduction.coupon_price)
				}).catch(err => {
					return this.$util.Tips({
						title: err
					});
				})
			},
			goCart() {
				if(this.promotions_type){
					uni.switchTab({
						url: '/pages/order_addcart/order_addcart'
					})
				}else{
					uni.switchTab({
						url: '/pages/goods_cate/goods_cate'
					})
				}
			},
			/*
			 * 加入购物车
			 */
			goCat: function(news) {
				let that = this,
					productSelect = that.productValue[this.attrValue];
				//如果有属性,没有选择,提示用户选择
				if (that.attr.productAttr.length && productSelect === undefined)
					return that.$util.Tips({
						title: '产品库存不足，请选择其它属性'
					});
				if (that.attr.productSelect.cart_num <= 0) {
					that.attr.productSelect.cart_num = 1
					return that.$util.Tips({
						title: '请先选择属性'
					});
				}
				let q = {
					productId: that.id,
					cartNum: that.attr.productSelect.cart_num,
					new: 0,
					uniqueId: that.attr.productSelect !== undefined ? that.attr.productSelect.unique : ''
				};
				postCartAdd(q)
					.then(function(res) {
						that.isOpen = false;
						that.attr.cartAttr = false;
						if (news) {
							uni.navigateTo({
								url: '/pages/goods/order_confirm/index?new=1&cartId=' + res.data.cartId
							});
						} else {
							that.$util.Tips({
								title: '添加购物车成功'
							});
						}
						that.getCartNum();
						that.getCartList();
					})
					.catch(err => {
						that.isOpen = false;
						return that.$util.Tips({
							title: err
						});
					});
			},
			/**
			 * 打开属性加入购物车
			 *
			 */
			joinCart: function(item) {
				//是否登录
				if (this.isLogin === false) {
					this.getIsLogin();
				} else {
					uni.showLoading({
						title: '加载中'
					});
					this.getAttrs(item.id);
					this.$set(this, 'id', item.id);
					this.$set(this.attr, 'cartAttr', true);
				}
			},
			// 商品详情接口；
			getAttrs(id) {
				let that = this;
				getAttr(id, 0).then(res => {
					uni.hideLoading();
					that.$set(that.attr, 'productAttr', res.data.productAttr);
					that.$set(that, 'productValue', res.data.productValue);
					that.$set(that, 'is_vip', res.data.storeInfo.is_vip);
					that.$set(that, 'storeInfo', res.data.storeInfo);
					that.DefaultSelect();
				})
			},
			/**
			 * 默认选中属性
			 *
			 */
			DefaultSelect: function() {
				let productAttr = this.attr.productAttr;
				let value = [];
				for (var key in this.productValue) {
					if (this.productValue[key].stock > 0) {
						value = this.attr.productAttr.length ? key.split(',') : [];
						break;
					}
				}
				for (let i = 0; i < productAttr.length; i++) {
					this.$set(productAttr[i], 'index', value[i]);
				}
				//sort();排序函数:数字-英文-汉字；
				let productSelect = this.productValue[value.join(',')];
				if (productSelect && productAttr.length) {
					this.$set(this.attr.productSelect, 'store_name', this.storeInfo.store_name);
					this.$set(this.attr.productSelect, 'image', productSelect.image);
					this.$set(this.attr.productSelect, 'price', productSelect.price);
					this.$set(this.attr.productSelect, 'stock', productSelect.stock);
					this.$set(this.attr.productSelect, 'unique', productSelect.unique);
					this.$set(this.attr.productSelect, 'cart_num', 1);
					this.$set(this, 'attrValue', value.join(','));
					this.$set(this.attr.productSelect, 'vip_price', productSelect.vip_price);
				} else if (!productSelect && productAttr.length) {
					this.$set(this.attr.productSelect, 'store_name', this.storeInfo.store_name);
					this.$set(this.attr.productSelect, 'image', this.storeInfo.image);
					this.$set(this.attr.productSelect, 'price', this.storeInfo.price);
					this.$set(this.attr.productSelect, 'stock', 0);
					this.$set(this.attr.productSelect, 'unique', '');
					this.$set(this.attr.productSelect, 'cart_num', 0);
					this.$set(this.attr.productSelect, 'vip_price', this.storeInfo.vip_price);
					this.$set(this, 'attrValue', '');
				} else if (!productSelect && !productAttr.length) {
					this.$set(this.attr.productSelect, 'store_name', this.storeInfo.store_name);
					this.$set(this.attr.productSelect, 'image', this.storeInfo.image);
					this.$set(this.attr.productSelect, 'price', this.storeInfo.price);
					this.$set(this.attr.productSelect, 'stock', this.storeInfo.stock);
					this.$set(this.attr.productSelect, 'unique', this.storeInfo.unique || '');
					this.$set(this.attr.productSelect, 'cart_num', 1);
					this.$set(this.attr.productSelect, 'vip_price', this.storeInfo.vip_price);
					this.$set(this, 'attrValue', '');
				}
			},
			/**
			 * 购物车手动填写
			 *
			 */
			iptCartNum: function(e) {
				this.$set(this.attr.productSelect, 'cart_num', e);
			},
			attrVal(val) {
				this.$set(this.attr.productAttr[val.indexw], 'index', this.attr.productAttr[val.indexw].attr_values[val
					.indexn]);
			},
			onMyEvent: function() {
				this.$set(this.attr, 'cartAttr', false);
			},
			/**
			 * 属性变动赋值
			 * 
			 */
			ChangeAttr: function(res) {
				let productSelect = this.productValue[res];
				if (productSelect && productSelect.stock > 0) {
					this.$set(this.attr.productSelect, "image", productSelect.image);
					this.$set(this.attr.productSelect, "price", productSelect.price);
					this.$set(this.attr.productSelect, "stock", productSelect.stock);
					this.$set(this.attr.productSelect, "unique", productSelect.unique);
					this.$set(this.attr.productSelect, 'vip_price', productSelect.vip_price);
					this.$set(this.attr.productSelect, "cart_num", 1);
					this.$set(this, "attrValue", res);
				} else if (productSelect && productSelect.stock == 0) {
					this.$set(this.attr.productSelect, "image", productSelect.image);
					this.$set(this.attr.productSelect, "price", productSelect.price);
					this.$set(this.attr.productSelect, "stock", 0);
					this.$set(this.attr.productSelect, "unique", "");
					this.$set(this.attr.productSelect, 'vip_price', productSelect.vip_price);
					this.$set(this.attr.productSelect, "cart_num", 0);
					this.$set(this, "attrValue", "");
				} else {
					this.$set(this.attr.productSelect, "image", this.storeInfo.image);
					this.$set(this.attr.productSelect, "price", this.storeInfo.price);
					this.$set(this.attr.productSelect, "stock", 0);
					this.$set(this.attr.productSelect, "unique", "");
					this.$set(this.attr.productSelect, 'vip_price', this.storeInfo.vip_price);
					this.$set(this.attr.productSelect, "cart_num", 0);
					this.$set(this, "attrValue", "");
				}
			},
			/**
			 * 购物车数量加和数量减
			 *
			 */
			ChangeCartNum: function(changeValue) {
				//changeValue:是否 加|减
				//获取当前变动属性
				let productSelect = this.productValue[this.attrValue];
				//如果没有属性,赋值给商品默认库存
				if (productSelect === undefined && !this.attr.productAttr.length) productSelect = this.attr
					.productSelect;
				//无属性值即库存为0；不存在加减；
				if (productSelect === undefined) return;
				let stock = productSelect.stock || 0;
				let num = this.attr.productSelect;
				if (changeValue) {
					num.cart_num++;
					if (num.cart_num > stock) {
						this.$set(this.attr.productSelect, 'cart_num', stock ? stock : 1);
						this.$set(this, 'cart_num', stock ? stock : 1);
					}
				} else {
					num.cart_num--;
					if (num.cart_num < 1) {
						this.$set(this.attr.productSelect, 'cart_num', 1);
						this.$set(this, 'cart_num', 1);
					}
				}
			},
			moreNav() {
				this.currentPage = !this.currentPage
			},
			// 品牌列表
			getBrand() {
				brand(this.where).then(res => {
					this.brandList = res.data;
				}).catch(err => {
					return this.$util.Tips({
						title: err.msg
					});
				})
			},
			//打开品牌弹窗
			set_brand() {
				this.brandtip = true
				this.currentPage = false
			},
			//关闭品牌/新品弹窗
			closeBrand() {
				this.brandtip = false
			},
			// 品牌选择
			seletBrand(id) {
				if (this.brandArray.indexOf(id) == -1) {
					this.brandArray.push(id)
				} else {
					this.brandArray.splice(this.brandArray.indexOf(id), 1)
				}
			},
			brandReset() {
				this.brandArray = []
				this.brandOk();
			},
			brandOk() {
				this.brandtip = false;
				this.loadend = false;
				this.$set(this.where, 'page', 1);
				this.get_product_list(true);
			},
			goDetail(id) {
				uni.navigateTo({
					url: `/pages/goods_details/index?id=${id}`
				})
			},
			// 去详情页
			godDetail(item) {
				console.log(item)
				uni.navigateTo({
					url: `/pages/goods_details/index?id=${item.id}`
				})
				
				// this.currentPage = false
				// if (this.promotions_type) {
				// 	uni.navigateTo({
				// 		url: `/pages/goods_details/index?id=${item.id}`
				// 	})
				// } else {
				// 	goShopDetail(item, this.uid).then(res => {
				// 		uni.navigateTo({
				// 			url: `/pages/goods_details/index?id=${item.id}`
				// 		})
				// 	})
				// }
			},
			Changswitch: function() {
				let that = this;
				this.currentPage = false
				that.is_switch = !that.is_switch
			},
			searchSubmit: function(e) {
				let that = this;
				this.currentPage = false
				that.$set(that.where, 'keyword', e.detail.value);
				that.loadend = false;
				that.$set(that.where, 'page', 1)
				this.get_product_list(true);
			},
			/**
			 * 获取我的推荐
			 */
			get_host_product: function() {
				let that = this;
				if (that.hotScroll) return
				getProductHot(
					that.hotPage,
					that.hotLimit,
				).then(res => {
					that.hotPage++
					that.hotScroll = res.data.length < that.hotLimit
					that.hostProduct = that.hostProduct.concat(res.data)
					// that.$set(that, 'hostProduct', res.data)
				});
			},
			//点击事件处理
			set_where: function(e) {
				this.currentPage = false
				switch (e) {
					case 1:
						// // #ifdef H5
						// return history.back();
						// // #endif
						// // #ifndef H5
						// return uni.navigateBack({
						// 	delta: 1,
						// })
						// // #endif
						this.isDefault = true
						this.stock = 0
						this.price = 0
						break;
					case 2:
						if (this.price == 0) this.price = 1;
						else if (this.price == 1) this.price = 2;
						else if (this.price == 2) this.price = 0;
						this.stock = 0;
						this.isDefault = false
						break;
					case 3:
						if (this.stock == 0) this.stock = 1;
						else if (this.stock == 1) this.stock = 2;
						else if (this.stock == 2) this.stock = 0;
						this.price = 0
						this.isDefault = false
						break;
					// case 4:
					// 	this.nows = !this.nows;
					// 	break;

				}
				this.loadend = false;
				this.$set(this.where, 'page', 1);
				this.get_product_list(true);
			},
			//设置where条件
			setWhere: function() {
				if (this.price == 0) this.where.priceOrder = '';
				else if (this.price == 1) this.where.priceOrder = 'asc';
				else if (this.price == 2) this.where.priceOrder = 'desc';
				if (this.stock == 0) this.where.salesOrder = '';
				else if (this.stock == 1) this.where.salesOrder = 'asc';
				else if (this.stock == 2) this.where.salesOrder = 'desc';
				this.where.news = this.nows ? 1 : 0;
			},
			//查找产品
			get_product_list: function(isPage) {
				let that = this;
				that.setWhere();
				if (that.loadend) return;
				if (that.loading) return;
				if (isPage === true) {
					if (this.is_switch) {
						that.$refs.waterfallsFlow.refresh();
					}
					that.$set(that, 'productList', []);
				}
				that.loading = true;
				that.loadTitle = '';
				
				getSearchList({
					keyword: this.where.keyword,
					brand_id: this.selectbrandIds.join(","),
					begin_price: this.rentMin,
					end_price: this.rentMax,
					begin_deposit_price: this.depositaMin,
					end_deposit_price: this.depositaMax,
					priceOrder: this.where.priceOrder,
					salesOrder: this.where.salesOrder,
					page: this.where.page,
					limit: this.where.limit
				}).then(res => {
					let list = res.data.list;
					let productList = that.$util.SplitArray(list, that.productList);
					let loadend = list.length < that.where.limit;
					that.loadend = loadend;
					that.loading = false;
					that.loadTitle = loadend ? '没有更多内容啦~' : '加载更多';
					that.$set(that, 'productList', productList);
					that.$set(that.where, 'page', that.where.page + 1);
				}).catch(err => {
					that.loading = false;
					that.loadTitle = '加载更多';
				})
				
				// getProductslist(that.where).then(res => {
				// 	let list = res.data;
				// 	let productList = that.$util.SplitArray(list, that.productList);
				// 	let loadend = list.length < that.where.limit;
				// 	that.loadend = loadend;
				// 	that.loading = false;
				// 	that.loadTitle = loadend ? '没有更多内容啦~' : '加载更多';
				// 	that.$set(that, 'productList', productList);
				// 	that.$set(that.where, 'page', that.where.page + 1);
				// 	if (!that.productList.length) this.get_host_product();
				// }).catch(err => {
				// 	that.loading = false;
				// 	that.loadTitle = '加载更多';
				// });
			},
		},
		onPullDownRefresh() {

		},
		onPageScroll(e) {
			this.currentPage = false
		},
		onReachBottom() {
			if (this.productList.length > 0) {
				this.get_product_list();
			} 
			// else {
			// 	this.get_host_product();
			// }

		}
	}
</script>

<style scoped lang="scss">
	/deep/ .u-icon__icon {
		font-size: 40rpx;
	}
	.popup-box {
		height: 900rpx;
		padding: 30rpx 20rpx;
		.popup-fot {
			padding:20rpx 0rpx 70rpx ;
			justify-content: space-around;
			background: #FFFFFF;
			box-shadow: 0rpx -2rpx 0rpx 0rpx #F5F5F5;
			.btn {
				height: 80rpx;
				width: 48%;
				border-radius: 40rpx;
				font-size: 32rpx;
				font-family: PingFangSC-Medium, PingFang SC;
				color: #1F1F1F;
				line-height: 32rpx;
				font-weight: 500;
				text-align: center;
				line-height: 80rpx;
			}
			.btn1 {
				background: #F5F7FA;
				font-weight: bold;
			}
			.btn2 {
				background: linear-gradient(90deg, #71EBDA 0%, #39CCC2 100%);
				border-color: #FFFFFF;
				color: #fff;
			}
		}
		.head-box {
			height: 770rpx;
			.price-interval {
				align-items: center;
				justify-content: space-between;
				input {
					background: transparent;
					height: 76rpx;
					text-align: center;
					font-size: 28rpx;
				}
				.line {
					width: 16rpx;
					height: 3rpx;
					background: #1F1F1F;
					border-radius: 6rpx;
				}
				.price-ipt {
					width: 320rpx;
					height: 76rpx;
					background: #F5F7FA;
					border-radius: 38rpx;
				}
			}
			.tit-txt {
				font-size: 30rpx;
				font-family: PingFangSC-Medium, PingFang SC;
				font-weight: bold;
				color: #1F1F1F;
				line-height: 32rpx;
				margin: 40rpx 0;
			}
			.head-tit {
				text-align: center;
				margin: 0rpx 0 30rpx;
			}
			.filter-scroll {
				overflow-y: scroll;
				max-height: 700rpx;
			}
			.brand-box {
				.brand-list {
					width: 33.33%;
					padding: 0 12rpx;
				}
				.brand-li {
					width: 100%;
					height: 76rpx;
					border-radius: 38rpx;
					border: 1px solid #F5F7FA;
					font-size: 28rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #1F1F1F;
					line-height: 28rpx;
					text-align: center;
					line-height: 76rpx;
					background-color: #F5F7FA;
				}
				.mar-t24 {
					margin-top: 24rpx;
				}
				.mar-r24 {
					margin-right: 24rpx;
				}
				// .selectbrandLi {
				// 	color: #39CCC2;
				// 	background-color: rgba(0,209,224,0.08);
				// 	border: 1rpx solid #39CCC2;
				// }
				
				.selectbrandLi {
					color: #FF6933;
					background: rgba(255,105,51,0.08);
					border: 1px solid #FF6933;
				}
				
				// justify-content: space-between;
				flex-wrap: wrap;
			}
		}
		
	}
  .productList{
	  .header{
		  position: fixed;
		  top:0;
		  left:0;
		  width: 100%;
		  z-index: 9;
		  background-color: var(--view-theme);
		  .bnt{
			  background: rgba(0, 0, 0, 0.2);
			  border-radius: 50rpx;
			  border: 0.5px solid rgba(255, 255, 255, 0.3);
			  position: fixed;
			  left:10px;
			  color: #fff;
			  .iconfont{
				  width: 48%;
				  text-align: center;
			  }
			  .lines{
				  width: 1rpx;
				  height: 34rpx;
				  background-color: rgba(225, 225, 225, 0.2);
			  }
		  }
		  .title{
			  font-size: 34rpx;
			  color: #fff;
		  }
	  }
  }	
  .height-add {
    height: 100rpx;
	height: calc(100rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
	height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
    width: 100%;
  }
	.home {
		color: #333;
		width: 56rpx;
		height: 56rpx;
		background: rgba(255, 255, 255, 1);
		border: 1px solid rgba(0, 0, 0, 0.1);
		border-radius: 40rpx;
		font-size: 33rpx;

		&.on {
			background: unset;
			color: #333;
		}

		&.homeIndex {
			width: 98rpx;
		}
	}

	.home .iconfont {
		width: 60rpx;
		text-align: center;
		font-size: 28rpx;
		font-weight: bold;
	}

	.home .line {
		width: 1rpx;
		height: 34rpx;
		background: #B3B3B3;
	}

	.home .icon-xiangzuo {
		font-size: 28rpx;
	}

	.clored {
		color: var(--view-theme);
		font-weight: 600;

		.icon-gou {
			font-weight: 400 !important;
		}
	}

	.selectbrand {
		position: fixed;
		background-color: #FFFFFF;
		z-index: 8;
		width: 100%;
		top: 170rpx;
		left: 0;
		max-height: 860rpx;
		overflow: hidden;
		overflow-y: auto;
		border-radius: 0 0 24rpx 24rpx;
		transform: translate3d(0, -100%, 0);
		transition: all .2s cubic-bezier(.9, .5, .5, .25);

		// padding-top: 200rpx;
		// padding-top: calc(200rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
		// padding-top: calc(200rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
		.box {
			.selet {
				display: flex;
				flex-wrap: wrap;
				padding: 20rpx 20rpx 0 20rpx;
				max-height: 520rpx;
				overflow-x: hidden;
				overflow-y: auto;

				.seletbox {
					width: 216rpx;
					height: 68rpx;
					border-radius: 34rpx;
					background-color: #F5F5F5;
					margin-bottom: 30rpx;
					text-align: center;
					font-size: 24rpx;
					margin-right: 28rpx;

					&:nth-child(3n) {
						margin-right: 0;
					}
				}

				.seleton {
					border: 1px solid var(--view-theme);
					background: var(--view-minorColorT);
					color: var(--view-theme);
				}
			}

			.btn {
				display: flex;
				justify-content: space-between;
				text-align: center;
				padding: 30rpx 20rpx 40rpx;

				.sambox {
					width: 328rpx;
					height: 64rpx;
					border-radius: 38rpx;
					border: 2rpx solid var(--view-theme);
					color: #FFFFFF;
					line-height: 64rpx;
				}

				.reset {
					color: var(--view-theme);
				}

				.ok {
					background: var(--view-theme);
				}
			}

			.tlebox {
				width: 100%;
				height: 88rpx;
				line-height: 88rpx;
				display: flex;
				justify-content: space-between;
				padding: 0 40rpx 0 36rpx;
				margin-left: 20rpx;
				border-bottom: 2rpx solid #EEEEEE;

			}

			.tlebox:last-child {
				border-bottom: 0;
			}
		}
	}

	.selectbrand.on {
		transform: translate3d(0, 0, 0);
	}
	.productList .searchMp{
	   padding-left: 23rpx;
	   padding-right: 5rpx;
	   margin-top: 7px;
	}
	.productList .searchMp .icon-pailie,
	.productList .searchMp .icon-tupianpailie{
		color: #fff;
		width: 62rpx;
		font-size: 40rpx;
		height: 33px;
		line-height: 33px;
	}
	
	.productList .searchMp .input{
		width: 636rpx;
		height: 30px;
		background-color: #fff;
		border-radius: 30rpx;
		padding: 0 20rpx;
		box-sizing: border-box;
		&.on{
			width: 704rpx;
			input{
				width: 619rpx;
			}
		}
		input{
			width: 550rpx;
			height: 100%;
			font-size: 26rpx;
		}
		.placeholder{
			color: #ccc;
		}
		.iconfont{
			color: #ccc;
			font-size: 35rpx;
		}
	}

	.productList .search {
		width: 100%; 
		height: 86rpx;
		padding-left: 23rpx;
		padding-right: 23rpx;
		box-sizing: border-box;
		position: fixed;
		left: 0;
		top: 0;
		z-index: 9;
		background-color: #fff;

		.fanhui {
			color: #fff;
		}
	}

	.productList .search .input {
		width: 100%;
		height: 60rpx;
		background-color: #fff;
		border-radius: 50rpx;
		padding: 0 20rpx;
		box-sizing: border-box;
		border: 1px solid #39CCC2;

		&.on {
			width: 652rpx;
			margin-right: 30rpx;

			input {
				width: 560rpx;
			}
		}
	}

	.productList .search .input input {
		width: 93%;
		height: 100%;
		font-size: 26rpx;
	}

	.productList .search .input .placeholder {
		color: #999;
	}

	.productList .search .input .iconfont {
		font-size: 35rpx;
		color: #555;
	}

	.productList .search .icon-pailie,
	.productList .search .icon-tupianpailie {
		color: #333;
		width: 62rpx;
		font-size: 40rpx;
		height: 86rpx;
		line-height: 86rpx;
	}

	.productList .nav {
		/* #ifdef H5 */
		height: 86rpx;
		/* #endif */
		/* #ifndef H5 */
		height: 45px;
		/* #endif */
		position: fixed;
		left: 0;
		width: 100%;
		font-size: 28rpx;
		background-color: #fff;
		margin-top: 86rpx;
		top: 0;
		z-index: 9;
		justify-content: space-between;
		
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #1F1F1F;
		line-height: 28rpx;
		.filter-l {
			width: 65%;
			justify-content: space-between;
		}
		.filter-r {
			width: 25%;
			padding-right: 20rpx;
			align-items: center;
			justify-content: flex-end;
			.r-multiple-screening {
				text {
					margin-left: 5rpx;
				}
			}
		}
	}

	.productList .nav .item {
		width: 25%;
		text-align: center;
	}

	.productList .nav .item.font-color {
		font-weight: bold;
	}

	.productList .nav .item image {
		width: 15rpx;
		height: 19rpx;
		margin-left: 10rpx;
	}
	.productList .list-box-row {
		.list-item {
			.item {
				display: flex;
				margin-top: 32rpx;
				width: 100% ;
				
				.pic {
					width: 248rpx;
					height: 248rpx;
					background: #FFFFFF;
					border-radius: 16rpx;
					overflow: hidden;
					position: relative;
					

					
					image {
						width: 248rpx;
						height: 248rpx;
					}
				}
			
				.main-box {
					flex: 1;
					margin-left: 24rpx;
					padding-bottom: 32rpx;
					border-bottom: 2rpx solid #FAFAFA;
					
					.title {
						font-size: 28rpx;
						font-weight: bold;
						color: #1F1F1F;
						line-height: 44rpx;
						vertical-align: middle;
						
						.news {
							display: inline-block;
							margin-right: 4rpx;
							width: 64rpx;
							height: 40rpx;
							line-height: 40rpx;
							font-size: 24rpx;
							font-weight: bold;
							color: #FFFFFF;
							background: linear-gradient(180deg, #FF9D5C 0%, #FF7847 100%);
							border-radius: 20rpx;
							text-align: center;
						}
					}
				
					.sub {
						margin-top: 16rpx;
						font-size: 24rpx;
						font-weight: 400;
						color: #999999;
						line-height: 24rpx;
					}
					
					.type {
						margin-top: 16rpx;
						display: flex;
						
						view {
							margin-left: 16rpx;
							width: 112rpx;
							height: 40rpx;
							line-height: 40rpx;
							border-radius: 4rpx;
							font-size: 24rpx;
							font-weight: 400;
							text-align: center;
							
							&:first-child { margin-left: 0; }
							
							&.jp {
								background: rgba(255,145,71,0.08);
								color: #FF9147;
							}
							
							&.bt {
								background: rgba(255,96,71,0.08);
								color: #FF3D1F;
							}
						}
					}
				
					.mb-bottom {
						margin-top: 24rpx;
						display: flex;
						align-items: flex-end;
						justify-content: space-between;
						
						.price {
							font-size: 28rpx;
							font-weight: bold;
							color: #FF1F2E;
							vertical-align: text-bottom;
							
							text {
								margin-left: 4rpx;
								font-size: 40rpx;
							}
							
							.note {
								margin-left: 8rpx;
								font-size: 24rpx;
								font-weight: 400;
								color: #FF1F2E;
							}
						}
						
						.tabs {
							display: flex;
							margin-left: 8rpx;
							
							.tab {
								margin-left: 8rpx;
								width: 104rpx;
								height: 32rpx;
								line-height: 32rpx;
								background: rgba(110,184,179,0.12);
								border-radius: 4rpx;
								font-size: 24rpx;
								color: #6EB8B3;
								text-align: center;
								
								&:first-child { margin-left: 0; }
							}
						}
					}
				}
			}
		}
	}
	.productList .list {
		padding: 0 20rpx;
		margin-top: 172rpx;

	}

	.productList .list.waterList {
		padding-top: 20rpx;
		.tips-box {
			font-size: 24rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #999999;
			line-height: 24rpx;
			margin: 20rpx 0;
		}
	}

	.productList .list.on {
		background-color: #fff;
		border-top: 1px solid #f6f6f6;

		.title {
			font-size: 22rpx;
			color: #333333;
			margin-top: 30rpx;

			.label {
				border-radius: 4rpx;
				padding: 2rpx 8rpx;
				background-color: var(--view-minorColorT);
				font-size: 20rpx;
				color: var(--view-theme);
				margin-right: 8rpx;
			}
		}

		.footer {
			width: 100%;
			height: 96rpx;
			background-color: #fff;
			position: fixed;
			bottom: 0;
			left: 0;
			box-shadow: 0 -4rpx 32rpx 0 rgba(0, 0, 0, 0.08);
			padding: 0 20rpx 0 32rpx;
			z-index: 9;
			box-sizing: border-box;
			padding-bottom: calc(constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/;
			padding-bottom: calc(env(safe-area-inset-bottom)); ///兼容 IOS<11.2/;
			height: calc(96rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
			height: calc(96rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/

			.right {
				color: #888888;
				font-size: 20rpx;
				margin-left: 32rpx;

				.num {
					font-size: 28rpx;
					color: #333333;
					font-weight: 400;

					.money {
						font-weight: 500;
					}
				}
			}

			.icon {
				width: 72rpx;
				height: 72rpx;
				background: #F5F5F5;
				border-radius: 50%;
				text-align: center;
				line-height: 72rpx;
				position: relative;

				.iconfont {
					font-size: 38rpx;
				}

				.num {
					min-width: 32rpx;
					background-color: #fff;
					color: var(--view-theme);
					border-radius: 15px;
					position: absolute;
					right: -14rpx;
					top: 0;
					font-size: 10px;
					padding: 0 8rpx;
					height: 34rpx;
					line-height: 31rpx;
					border: 1px solid var(--view-theme);
				}
			}

			.bnt {
				width: 192rpx;
				height: 64rpx;
				background: var(--view-theme);
				border-radius: 40rpx;
				color: #FFFFFF;
				font-size: 28rpx;
				text-align: center;
				line-height: 64rpx;
			}
		}
	}

	.productList .list .item {
		width: 345rpx;
		margin-top: 20rpx;
		background-color: #fff;
		border-radius: 20rpx;

		.text {
			&.on {
				.nameCon {
					height: 136rpx;
				}

				.name {
					margin-bottom: 4rpx;
				}

				.label {
					font-size: 20rpx;
					color: var(--view-theme);
					border-radius: 4rpx;
					border: 1px solid var(--view-theme);
					/* #ifdef APP */
					padding: 2rpx 6rpx 0rpx 6rpx;
					/* #endif */
					/* #ifndef APP */
					padding: 0 6rpx;
					/* #endif */
					margin-right: 10rpx;
				}

				.sales {
					color: #999999;
					font-size: 22rpx;
					margin-top: 10rpx;

					.score {
						margin-left: 24rpx;
					}

					.icon {
						width: 48rpx;
						height: 48rpx;
						border-radius: 50%;
						border: 1px solid var(--view-theme);
						font-size: 20rpx;
						color: var(--view-theme);
					}
				}
			}
		}
	}

	.productList .list .item.on {
		width: 100%;
		display: flex;
		margin: 30rpx 0 0 0;
	}

	.productList .list .item .pictrue {
		position: relative;
		width: 100%;
		height: 345rpx;
	}

	.productList .list .item .pictrue.on {
		width: 240rpx;
		height: 240rpx;
		position: relative;
		
		.activityFrame{
			border-radius: 12rpx;
		}

		.masks {
			position: absolute;
			top: 0;
			left: 0;
			right: 0;
			bottom: 0;
			background: rgba(0, 0, 0, 0.2);
			border-radius: 10rpx;

			.bg {
				width: 110rpx;
				height: 110rpx;
				background: #000000;
				opacity: 0.6;
				color: #fff;
				font-size: 22rpx;
				border-radius: 50%;
				padding: 22rpx 0;
				text-align: center;
			}
		}
	}

	.productList .list .item .pictrue image {
		width: 100%;
		height: 100%;
		border-radius: 20rpx 20rpx 0 0;
	}

	.productList .list .item .pictrue image.on {
		border-radius: 12rpx;
	}

	.productList .list .item .text {
		padding: 20rpx 17rpx 26rpx 17rpx;
		font-size: 30rpx;
		color: #222;
	}

	.productList .list .item .text.on {
		width: 460rpx;
		padding: 0 0 0 22rpx;
	}

	.productList .list .item .text .money {
		font-size: 26rpx;
		font-weight: bold;
		margin-top: 8rpx;
	}

	.productList .list .item .text .money.on {
		margin-top: 0;
		margin-right: 5rpx;
	}

	.productList .list .item .text .money .num {
		font-size: 34rpx;
	}

	.productList .list .item .text .vip {
		font-size: 22rpx;
		color: #aaa;
		margin-top: 7rpx;
	}

	.productList .list .item .text .vip.on {
		margin-top: 12rpx;
	}

	.productList .list .item .text .vip .vip-money {
		font-size: 24rpx;
		color: #282828;
		font-weight: 600;
	}

	.productList .list .vip .vip-money .icon {
		font-size: 15rpx;
		background: #FF9500;
		color: #fff;
		border-radius: 18rpx;
		padding: 1rpx 6rpx;
		margin-left: 10rpx;
		min-width: 60rpx;

		.iconfont {
			font-size: 15rpx;
			margin-right: 5rpx;
		}

		&.on {
			background: #333;
			color: #FDDAA4;
			min-width: unset;
		}
	}

	.productList .list .item .text .vip .vip-money image {
		width: 46rpx;
		height: 21rpx;
		margin-left: 4rpx;
	}

	.noCommodity {
		border-top: none !important;
		// background-color: #fff;
		padding-bottom: 30rpx;
		.emptyBox{
			text-align: center;
			.tips{
				color: #aaa;
				font-size: 26rpx;
			}
			image {
				width: 414rpx;
				height: 304rpx;
			}
		}
	}

	.waterfalls {
		padding: 10rpx 16rpx 16rpx 16rpx;
		color: #222;
		
		
		.tit-tag {
			padding: 0rpx 7rpx;
			background: linear-gradient(180deg, #FF9D5C 0%, #FF7847 100%);
			border-radius: 20rpx;
			font-size: 24rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #FFFFFF;
			margin-right: 10rpx;
		}
		
		
		// .waterfalls-tit {
		// 	.tit-tag {
		// 		padding: 0rpx 7rpx;
		// 		background: linear-gradient(180deg, #FF9D5C 0%, #FF7847 100%);
		// 		border-radius: 20rpx;
		// 		font-size: 24rpx;
		// 		font-family: PingFangSC-Medium, PingFang SC;
		// 		font-weight: 500;
		// 		color: #FFFFFF;
		// 		margin-right: 10rpx;
		// 	}
		// }
		.info-lable-box {
			margin-top: 16rpx;
			.lable-li {
				width: 112rpx;
				height: 40rpx;
				border-radius: 4rpx;
				font-size: 24rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				line-height: 24rpx;
				text-align: center;
				line-height: 40rpx;
			}
			.li-cor0 {
				background: rgba(255,145,71,0.08);
				color: #FF9147;
				margin-right: 10rpx;
			}
			.li-cor1 {
				background: rgba(255,96,71,0.08);
				color: #FF3D1F;
			}
			flex-wrap: wrap;
		}
		.price-box {
			margin-top: 16rpx;
			.info-price {
				.price-icon {
					font-size: 28rpx;
					position: relative;
					top: 5rpx;
				}
				.price-unit {
					font-size: 24rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					line-height: 24rpx;
				}
				color: #FF1F2E;
				margin-top: 10rpx;
				align-items: flex-end;
				font-size: 40rpx;
				font-family: D-DIN-Bold, D-DIN;
				font-weight: bold;
				line-height: 30rpx;
				margin-right: 15rpx;
			}
		}
		.serve-box {
			margin-top: 20rpx;
			.serve-li {
				width: 104rpx;
				height: 32rpx;
				background: rgba(110,184,179,0.12);
				border-radius: 4rpx;
				font-size: 24rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #6EB8B3;
				line-height: 32rpx;
				text-align: center;
				&:first-child {
					margin-right: 10rpx;
				}
			}
		}
		.name {
			font-size: 28rpx;
		}

		.label {
			font-size: 20rpx;
			color: var(--view-theme);
			border-radius: 4rpx;
			border: 1px solid var(--view-theme);
			padding: 0 6rpx;
			display: inline-block;
			margin-top: 10rpx;
			margin-right: 10rpx;
		}

		.money {
			font-size: 26rpx;
			font-weight: 700;

			.num {
				font-size: 34rpx;
			}

			.nums {
				font-size: 28rpx;
			}
		}

		.vip {
			font-size: 22rpx;
			color: #aaa;
			margin-top: 6rpx;

			.vip-money {
				font-size: 24rpx;
				color: #282828;
				font-weight: bold;

				image {
					width: 46rpx;
					height: 21rpx;
					margin-left: 4rpx;
				}
			}
		}
	}
	.mask {
		z-index: 5 !important;
	}
</style>